package com.runtu.test.types.rule01.factory;

import com.runtu.test.types.rule01.logic.ReluLogic101;
import com.runtu.test.types.rule01.logic.ReluLogic102;
import com.runtu.test.types.rule02.factory.Rule02TradeRuleFactory;
import com.runtu.types.design.framework.link.model1.ILogicLink;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @ClassName Rule01TradeRuleFactory
 * @Description TODO
 * @date 2025/8/7 16:31
 * @Version 1.0
 */
@Service
public class Rule01TradeRuleFactory {

    /*注入两个链路*/
    @Resource
    private ReluLogic101 reluLogic101;
    @Resource
    public ReluLogic102 reluLogic102;

    /*进行填充*/
    public ILogicLink<String, Rule02TradeRuleFactory.DynamicContext,String> openLogicLink(){

        reluLogic101.appendNext(reluLogic102);//将两个节点关联起来
        return reluLogic101;
    }

    @Data
    @Builder
    @AllArgsConstructor
    @NoArgsConstructor
    public static class DynamicContext{
        private String age;
    }
}
